A process may be thought of as an instance of the execution of a program by a client, or a service started by the operating system. For example, the process includes a sequence of states of the executing program, such as the program code, data, and the state of the processor(s) that are executing the program, e.g. values in registers of the processor. Thus, the process is a “running” program (either client program or a service) and a particular set of data that is associated with the program.
During execution of the process, the process may communicate information with another process, such as to exchange information, synchronize execution, and so on. Communication between processes is generally referred to as InterProcess communication (IPC). IPC includes a programming interface that may be utilized to communicate between a plurality of processes that are executed concurrently on the client or server computer. For instance, a plurality of processes may be utilized in the execution of a single program so that the program can handle a plurality of concurrent user requests. In another instance, a single user request may result in the concurrent execution of a plurality of processes. IPC is utilized to make this concurrent execution possible by providing for data communication between the processes.
During the concurrent execution of the plurality of processes, however, one of the processes may be executed more quickly than another one of the processes. If one of the processes sends data to another process, for instance, the receiving process should not impede the sender even if the receiving process is not ready to consume the data from the sending process. To optimize the communication between the processes, a buffer may be utilized. The buffer may be implemented as a storage area in memory that is shared by processes that are executed at different speeds, different priorities, and so on. The buffer, for instance, may allow each process to be executed without being dependent on another process.
When designing the buffer, the buffer designer may configure the size of the buffer and algorithms for moving data into and out of the buffer to optimize the functionality of the buffer. When configuring the buffer, the designer oftentimes is forced to make a “best guess” about the buffer sizes for communication between the processes. As previously stated, however, a wide variety of processes may be executed on the client to provide a wide variety of functionality. Therefore, the buffer designer may not have sufficient information regarding the contemplated usage patterns, required communication speed, comparative rates of generating logical messages and consuming those messages by the other process. Additionally, once the buffer is designed, the buffer is generally fixed in both size, e.g. amount of data that may be stored in the buffer, and by the algorithms that are utilized to control data flow using the buffer. Therefore, the buffer management algorithms may be designed for situations that are not similar to the actual situations that the buffer encounters during operation, which may decrease the usefulness of the buffer.
Therefore, there is a continuing need to improve techniques for interprocess buffer management using adaptive algorithms.